package com.example.myapplication.activity.live_activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.example.myapplication.R;
import com.example.myapplication.utils.DateUtil;

public class ActSendActivity extends AppCompatActivity implements View.OnClickListener {
    private TextView tvSend;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_act_send);
        tvSend = findViewById(R.id.tv_send);
        findViewById(R.id.btn_send).setOnClickListener(this);
    }


    @Override
    public void onClick(View view) {
        //新建意图
        Intent intent = new Intent(this, ActReceiveActivity.class);
        //新建包裹
        Bundle bundle = new Bundle();
        bundle.putString("requestTime", DateUtil.getNowTime());
        bundle.putString("requestContent", tvSend.getText().toString());
        //意图赛包裹
        intent.putExtras(bundle);
        startActivity(intent);
    }
}